let gameDao = module.exports;
let util = require('util');
let mysqlPool = require('./MySQLPool');

class UserLoginRecordDAO {
    constructor(){

    }

    async save(uid, ip, ua, ch){
        let sql = 'insert into users_login_record (uid, ip, channel, ext_info, create_time, update_time)' +
        '                                  values (?,   ?,  ?,       ?,        now(),       now())';

        let args = [uid, ip, ch, ua];
        let res = await mysqlPool.query(sql, args);
        if (res){
            return res;
        }
    }
}

let userLoginRecordDAO = new UserLoginRecordDAO();
module.exports = userLoginRecordDAO;
